package abstractEntities;

import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;
import org.hibernate.annotations.GenericGenerator;

import entities.Departament;

/**
 * AbstractDepartamentranking entity provides the base persistence definition of
 * the Departamentranking entity. @author MyEclipse Persistence Tools
 */
@MappedSuperclass
public abstract class AbstractDepartamentranking implements
		java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = -872952580005600601L;
	private Integer idRankingD;
	private Departament departamentByIdDepartament2;
	private Departament departamentByIdDepartament3;
	private Departament departamentByIdDepartament4;
	private Departament departamentByIdDepartament5;
	private Departament departamentByIdDepartament1;
	private Integer date;

	// Constructors

	/** default constructor */
	public AbstractDepartamentranking() {
	}

	/** full constructor */
	public AbstractDepartamentranking(Departament departamentByIdDepartament2,
			Departament departamentByIdDepartament3,
			Departament departamentByIdDepartament4,
			Departament departamentByIdDepartament5,
			Departament departamentByIdDepartament1, Integer date) {
		this.departamentByIdDepartament2 = departamentByIdDepartament2;
		this.departamentByIdDepartament3 = departamentByIdDepartament3;
		this.departamentByIdDepartament4 = departamentByIdDepartament4;
		this.departamentByIdDepartament5 = departamentByIdDepartament5;
		this.departamentByIdDepartament1 = departamentByIdDepartament1;
		this.date = date;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "idRankingD", unique = true, nullable = false)
	public Integer getIdRankingD() {
		return this.idRankingD;
	}

	public void setIdRankingD(Integer idRankingD) {
		this.idRankingD = idRankingD;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "idDepartament2", nullable = false)
	public Departament getDepartamentByIdDepartament2() {
		return this.departamentByIdDepartament2;
	}

	public void setDepartamentByIdDepartament2(
			Departament departamentByIdDepartament2) {
		this.departamentByIdDepartament2 = departamentByIdDepartament2;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "idDepartament3", nullable = false)
	public Departament getDepartamentByIdDepartament3() {
		return this.departamentByIdDepartament3;
	}

	public void setDepartamentByIdDepartament3(
			Departament departamentByIdDepartament3) {
		this.departamentByIdDepartament3 = departamentByIdDepartament3;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "idDepartament4", nullable = false)
	public Departament getDepartamentByIdDepartament4() {
		return this.departamentByIdDepartament4;
	}

	public void setDepartamentByIdDepartament4(
			Departament departamentByIdDepartament4) {
		this.departamentByIdDepartament4 = departamentByIdDepartament4;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "idDepartament5", nullable = false)
	public Departament getDepartamentByIdDepartament5() {
		return this.departamentByIdDepartament5;
	}

	public void setDepartamentByIdDepartament5(
			Departament departamentByIdDepartament5) {
		this.departamentByIdDepartament5 = departamentByIdDepartament5;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "idDepartament1", nullable = false)
	public Departament getDepartamentByIdDepartament1() {
		return this.departamentByIdDepartament1;
	}

	public void setDepartamentByIdDepartament1(
			Departament departamentByIdDepartament1) {
		this.departamentByIdDepartament1 = departamentByIdDepartament1;
	}

	@Column(name = "date", nullable = false)
	public Integer getDate() {
		return this.date;
	}

	public void setDate(Integer date) {
		this.date = date;
	}

}